The OCR (Optical Character Recognition) technology has been widely applied and the OCR technologies for both Chinese and English have been well developed, but as far as a mathematical formula having a complicated structure is concerned, the present OCR technology cannot provide a good support, so the present invention aims at solving this problem to meet the application requirement.